﻿using EmoneyWeiXinBLL;
using EmoneyWeiXinCommon;
using EmoneyWeiXinEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace EmoneyWeiXin.Controllers
{
    public class UserPhoneBindController : Controller
    {
        //
        // GET: /UserPhoneBind/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult DoAdd()
        {

            string phoneNum = Request["phoneNum"];
            string weixinId = Request["weixinId"];
            string openId = Request["openId"];
            string QQNum = Request["QQNum"];

            weixinId = "1";
            openId = "sdfsdfsdfsdfsdfsdfsd";
            phoneNum = "13023020000";
            QQNum = "sdfdsfsdfs";

            UserPhoneBindEntity entity = new UserPhoneBindEntity();
            entity.weixinId = int.Parse(weixinId);
            entity.openId = openId;
            entity.phoneDefEncode =phoneNum;
            entity.phoneHideMid = StringTools.HideMobilePhoneMid4(phoneNum);
            entity.phoneMd5 = StringTools.Md5(phoneNum).ToUpper();
            entity.QQNumber = QQNum;
            UserPhoneBindBLL bll = new UserPhoneBindBLL();
            bll.Insert(entity);
            return Content("");

        }

    }
}
